Autodesk.AutoCAD.ApplicationServices Namespace > Application Class > Application Methods > ShowModalDialog Method > ShowModalDialog(IWin32Window, Form, [MarshalAs(UnmanagedType.U1)] bool) Method
Application.ShowModalDialog(IWin32Window, Form, [MarshalAs(UnmanagedType.U1)] bool) Method
Description

Shows a modal dialog. This method should be used instead of Form.ShowDialog, which may lead to unexpected behavior.

Visual Basic
Public static Function ShowModalDialog(
    owner As IWin32Window, 
    formToShow As Form, 
    persistSizeAndPosition As [MarshalAs(UnmanagedType.U1)] bool
) As System.Windows.Forms.DialogResult
C#
public static System.Windows.Forms.DialogResult ShowModalDialog(
    IWin32Window owner, 
    Form formToShow, 
    [MarshalAs(UnmanagedType.U1)] bool persistSizeAndPosition
);
Parameters
Parameters 
Description 
IWin32Window owner 
Input the owner window of this dialog. 
Form formToShow 
Input the form to be shown. 
[MarshalAs(UnmanagedType.U1)] bool persistSizeAndPosition 
Input true if the size and position should not change. 
Links
   Comments?